<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex align-stretch benben-position-layout flex myTrack_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex align-center justify-between flex-sub myTrack_fd0_0'      >
            <view   class='flex align-center myTrack_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  myTrack_fd0_0_c0_c0'  >&#xE794;</text>
</view>
    <view   class='flex align-center'      >
        <text class='myTrack_fd0_0_c1_c0'  >{{$t('我的足迹')}}</text>
</view>
    <view   class='flex align-center justify-end myTrack_fd0_0_c0' :style="{'margin-right':`${ appSystemIdentification == 'Wechat' ?  '30%':''}`}"  @tap.stop="switchTypeFunc()"   >
        <text class='myTrack_fd0_0_c2_c0'    v-if= " is_edit===false"  >{{$t('编辑')}}</text><text class='myTrack_fd0_0_c2_c0'    v-if= " is_edit===true"  >{{$t('完成')}}</text>
</view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<benben-popup v-model="popupShow1691652180194" :mask="true" :mask-close-able="true"  mode='center' >
    <!---flex布局flex布局开始-->
 <view class="flex benben-flex-layout flex-wrap align-center"    >
        <benben-calendar-diy  mode='range' year-arrow-color='#666666' month-arrow-color='#666666' start-text=' ' end-text=' ' active-bg-color='rgba(45, 175, 65, 1)' range-bg-color='rgba(45, 175, 65, 0.5)' :change-title='true' :change-year='true' :change-month='true' class='myTrack_fd1_0'  @change="queryListFunc()"  :start-time.sync="start_time" :end-time.sync="end_time"></benben-calendar-diy>
</view>
        
<!---flex布局flex布局结束-->
    
</benben-popup>
<!---flex布局flex布局开始-->
 <view class="flex benben-flex-layout flex-wrap align-center myTrack_flex_2"    >
            <view   class='flex flex-wrap align-center justify-center myTrack_fd2_0'   @tap.stop="popupShow1691652180194=true"   >
        <text class='flex-sub myTrack_fd2_0_c0'    v-if= "start_time==''"  >{{$t('开始时间')}}</text><text class='flex-sub myTrack_fd2_0_c0'    v-if= "start_time!=''"  >{{start_time}}</text>
<image class='myTrack_fd2_0_c1'  mode="aspectFit"  :src='STATIC_URL+"288.png"'></image>
</view>
<text class='myTrack_fd2_1'  >至</text>
    <view   class='flex flex-wrap align-center justify-center myTrack_fd2_0'   @tap.stop="popupShow1691652180194=true"   >
        <text class='flex-sub myTrack_fd2_0_c0'    v-if= "end_time==''"  >{{$t('结束时间')}}</text><text class='flex-sub myTrack_fd2_0_c0'    v-if= "end_time!=''"  >{{end_time}}</text>
<image class='myTrack_fd2_0_c1'  mode="aspectFit"  :src='STATIC_URL+"288.png"'></image>
</view>
</view>
        
<!---flex布局flex布局结束-->
        <benben-goods-footprint time-format='MM月DD日' price-before='￥' class='myTrack_flex_footprint_3':is-editor.sync='is_edit' :goods-list.sync='dataList' :goods-id.sync='shop_id' v-model='detele_id' @handleDel="deleteFootprintFunc()" @handleGoods="jumpFunc()" >
        </benben-goods-footprint>
<!---订单列表flex布局开始-->
 <view class="flex flex-wrap align-center justify-center benben-flex-layout myTrack_flex_4"   v-if= " dataList.length<=0 && dataGoodsList.length>0" >
        <image class='myTrack_fd4_0'  mode="aspectFit"  :src='STATIC_URL+"214.png"'></image>
<text class='myTrack_fd4_1'  >{{$t('猜你喜欢')}}</text>
<image class='myTrack_fd4_0'  mode="aspectFit"  :src='STATIC_URL+"215.png"'></image>
</view>
        
<!---订单列表flex布局结束-->
<!---flex布局flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myTrack_flex_5"   v-if= " dataList.length<=0 && dataGoodsList.length>0" >
            <view   class='flex flex-wrap align-center justify-between myTrack_fd5_0'      >
            <template v-for = '(item,key0) in dataGoodsList'>
    <view   class='flex flex-direction flex-wrap align-stretch myTrack_fd5_0_c0'   @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/fl/shopDetail/shopDetail?id=${item.aid}`"    :key='key0'>
        <image class='myTrack_fd5_0_c0_c0'  mode="aspectFill"  :src='item.thumb'></image>
<text class='myTrack_fd5_0_c0_c1'  >{{item.name}}</text>
    <view   class='flex flex-wrap align-center myTrack_fd5_0_c0_c2'      >
        <text class='myTrack_fd5_0_c0_c2_c0'  >{{$t('销量')}}</text>
<text class='myTrack_fd5_0_c0_c2_c1'  >{{item.sales_sum}}</text>
</view>
    <view   class='flex flex-wrap align-center myTrack_fd5_0_c0_c3'      >
        <text class='myTrack_fd5_0_c0_c3_c0'  >¥</text>
<text class=' myTrack_fd5_0_c0_c3_c1'   >
    <text class=' myTrack_price1_fd5_0_c0_c3_c1' >{{ item.shop_price | frontPrice }}</text>
    <text class=' myTrack_price2_fd5_0_c0_c3_c1' >{{ item.shop_price | laterPrice }}</text>
</text>
<text class='myTrack_fd5_0_c0_c3_c2'  >{{item.market_price}}</text>
</view>
</view>
    </template>
    <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
</view>
</view>
        
<!---flex布局flex布局结束-->
    
    
        </view>
    </view>
</template>
<script>
    import pagingList from '@/common/mixin/paging_list.js';
import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        mixins: [pagingList],
        
        data(){
			return {"popupShow1691652180194":false,"minixPagingListsApi":"","pageingListApiMethod":"","allowOnloadGetList":false,"dataList":[],"is_edit":false,"shop_id":"","detele_id":"","true":true,"falses":false,"start_time":"","end_time":"","dataGoodsList":[]};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
                  /**
     * @returns 
      * Android       安卓
      * IOS       苹果
      * Web       H5 或 pc
      * Wechat       微信小程序
      * Alipay       支付宝小程序
      * Baidu       百度小程序
      * ByteBounce       抖音小程序
      * 360       360小程序
      * FastApp       快应用
    */
    appSystemIdentification() {
      return this.$store.state.appSystemIdentification
    }
		},
		watch:{},
		onLoad(options){
            this.getGoosListFunc()
this.queryListFunc()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            this.queryListFunc()
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //切换编辑状态
                 switchTypeFunc(){
                        if(this.is_edit===false){
           this.is_edit = this.true;
   this.detele_id = '';
                return
    }
    if(this.is_edit===true){
           this.is_edit = this.falses;
   this.detele_id = '';
                return
    }
                },
                //获取足迹列表
                async queryListFunc(){
                        //请求方法
    //数据验证
    
  let datadataList = await this.$api.get(global.apiUrls.post64145c1253b3e, {
    start_time:this.start_time,end_time:this.end_time
  });
  
  if (datadataList.data.code != 1) {
    this.$message.info(datadataList.data.msg);
    return
  } 
  let infodataList = datadataList.data;
  this.dataList = infodataList.data
  
    this.popupShow1691652180194 = false;
                },
                //点击商品
                 jumpFunc(){
                        this.$urouter.navigateTo(`/pages/fl/shopDetail/shopDetail?id=${this.shop_id}&goods_id=${this.shop_id}`);
                },
                //获取为你推荐
                 getGoosListFunc(){
                                    this.minixPagingListsApi = global.apiUrls.post64184ac1cafc3;
                this.pageingListApiMethod = 'get';
                this.allowOnloadGetList = false;
                this.pagingListPostDataContent = {goods_type:'2'}
                this.listData = [];
                this.dataGoodsList = this.listData;
                this.pagingListToggle();
                
                },
                //删除足迹
                async deleteFootprintFunc(){
                        //请求方法
    //数据验证
    
  let data64145e74b3a92 = await this.$api.get(global.apiUrls.post64145e74b3a92, {
    aid:this.detele_id
  });
  
  if (data64145e74b3a92.data.code != 1) {
    this.$message.info(data64145e74b3a92.data.msg);
    return
  } 
  
  
  
                    this.queryListFunc()
                },
                pagingListPostData(){
                    return this.pagingListPostDataContent
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:#fff;background-size: 100% auto;
        }
    .myTrack_flex_0{
        background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .myTrack_fd0_0_c2_c0{
        font-size:32rpx;font-weight:400;color:#333;
    }
    .myTrack_fd0_0_c1_c0{
        font-size:36rpx;font-weight:500;color:#333;
    }
    .myTrack_fd0_0_c0_c0{
        font-size:32rpx;font-weight:500;color:#333;
    }
    .myTrack_fd0_0_c0{
        width:120rpx;
    }
    .myTrack_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;line-height:88rpx;
    }
    .myTrack_fd1_0{
        background:#ffffff;width:640rpx;border-radius:16rpx;padding:12rpx 012rpx 012rpx 012rpx;
    }
    .myTrack_flex_2{
        padding:24rpx 32rpx 24rpx 32rpx;
    }
    .myTrack_fd2_1{
        font-size:24rpx;margin:0rpx 24rpx 0rpx 24rpx;
    }
    .myTrack_fd2_0_c1{
        width:30rpx;height:30rpx;border-radius:0rpx 0rpx 0rpx 0rpx;margin:4rpx 0rpx 0rpx 0rpx;
    }
    .myTrack_fd2_0_c0{
        text-align:center;font-size:24rpx;
    }
    .myTrack_fd2_0{
        border:1px solid rgba(191, 191, 191, 1);width:245rpx;height:56rpx;border-radius:8rpx;padding:0rpx 20rpx 0rpx 0rpx;
    }
    .myTrack_flex_footprint_3{
        --checked-active:var(--benbenFontColor5);
    }
    .myTrack_flex_4{
        padding:51rpx 0rpx 33rpx 0rpx;
    }
    .myTrack_fd4_1{
        font-size:40rpx;font-weight:600;color:#333;margin:0rpx 24rpx 0rpx 24rpx;
    }
    .myTrack_fd4_0{
        width:138rpx;height:28rpx;
    }
    .myTrack_flex_5{
        padding:0rpx 24rpx 0rpx 24rpx;
    }
    .myTrack_fd5_0_c0_c3_c2{
        color:#B2B2B2;font-size:24rpx;font-weight:400;line-height:33rpx;text-decoration:line-through;margin:0rpx 0rpx -8rpx 11rpx;
    }
    .myTrack_price2_fd5_0_c0_c3_c1{
        font-size:22rpx;
    }
    .myTrack_price1_fd5_0_c0_c3_c1{
        font-size:32rpx;font-weight:700;
    }
    .myTrack_fd5_0_c0_c3_c1{
        color:#ff5536;font-weight:700;font-size:20rpx;line-height:30rpx;margin:6rpx 0rpx 0rpx 0rpx;
    }
    .myTrack_fd5_0_c0_c3_c0{
        color:#EF3A3A;font-weight:600;font-size:20rpx;
    }
    .myTrack_fd5_0_c0_c3{
        margin:0rpx 20rpx 0rpx 20rpx;
    }
    .myTrack_fd5_0_c0_c2_c1{
        color:#999999;font-size:24rpx;font-weight:400;line-height:33rpx;
    }
    .myTrack_fd5_0_c0_c2_c0{
        color:#999999;font-size:24rpx;font-weight:400;line-height:33rpx;margin:0rpx 0rpx 0rpx 0rpx;
    }
    .myTrack_fd5_0_c0_c2{
        margin:16rpx 20rpx 16rpx 20rpx;
    }
    .myTrack_fd5_0_c0_c1{
        color:#333333;font-size:28rpx;font-weight:700;line-height:40rpx;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;margin:24rpx 20rpx 0rpx 20rpx;
    }
    .myTrack_fd5_0_c0_c0{
        width:346rpx;height:346rpx;border-radius:16rpx 16rpx 0rpx 0rpx;
    }
    .myTrack_fd5_0_c0{
        background:#FFFFFF;border-radius:16rpx 16rpx 16rpx 16rpx;width:344rpx;padding:0rpx 0rpx 24rpx 0rpx;box-shadow:0rpx 3rpx 30rpx #E8E8E8;margin:0rpx 0rpx 20rpx 0rpx;
    }
    .myTrack_fd5_0{
        margin:0rpx 0rpx 0rpx 0rpx;
    }
</style>